package com.ccc.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.ccc.dao.LineDao;
import com.ccc.model.Line;
import com.ccc.util.dao.UtilDao;

@Component("lineDao")
public class LineDaoImpl implements LineDao {
	
	@Resource
	private UtilDao utilDao;

	@Override
	public void addLine(Line line) {
		utilDao.save(line);
	}

	@Override
	public void deleteLine(Line line) {
		utilDao.delete(line);
	}

	@Override
	public void updateLine(Line line) {
		utilDao.update(line);
	}

	@Override
	public Line findLine(int id) {
		return utilDao.find(Line.class, id);
	}

	@Override
	public List<Line> findLine(String hql, Object[] o) {
		return utilDao.find(hql, o);
	}

	@Override
	public void deleteLine(int id) {
		utilDao.delete(id);
		
	}

}
